<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/22
 * Time: 10:21
 */

use yii\helpers\Html;
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\helpers\Fun;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <?= $this->renderFile('@app/views/layouts/toolbar.php'); ?>
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
        <div style="width:100%;height:40px;">
            <?= Html::beginForm('', 'get') ?>
            <?= \common\components\helpers\Search::dropDownList('status',null,['1'=>'启用','2'=>'禁用'], ['label' => '状态', 'promote' => '请选择', 'class' => 'search diy_select_txt']) ?>
            <?= \common\components\helpers\Search::submitButton('搜索', ['id' => 'search-handle', 'class' => "yx-search yx-radius2"]); ?>
        </div>
        <?php Html::endForm() ?>
    </div>
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check"
               data-tablesaw-mode="swipe" data-tablesaw-minimap>
            <thead>
            <tr class="yx-bgd2f6ec">
                <th scope="code"><?= \Yii::t('zhtfrontend', '等级'); ?></th>
                <th scope="notes"><?= \Yii::t('zhtfrontend', '充值/购买价格'); ?></th>
                <th scope="is_required"><?= \Yii::t('zhtfrontend', '有效期'); ?></th>
                <th scope="status"><?= \Yii::t('zhtfrontend', '状态'); ?></th>
                <th scope="status"><?= \Yii::t('zhtfrontend', '添加时间'); ?></th>
                <th scope="operate"><?= \Yii::t('zhtfrontend', '操作'); ?></th>
            </tr>
            </thead>
            <?php if ($data) { ?>
                <?php foreach ($data as $item) { ?>
                    <tr>
                        <td><?= $item['gradename'] ?></td>
                        <td><?= $item['money'] ?></td>
                        <td><?= $item['expiry_date'].' 年' ?></td>
                        <td><?= $item['status'] ?></td>
                        <td><?= $item['created_at'] ?></td>
                        <td><?= $item['operate'] ?></td>
                    </tr>
                <?php } ?>
            <?php } ?>
        </table>
    </div>
    <div style="text-align: right"><?= \common\components\widgets\GoPager::widget(['pagination' => $pages]); ?></div>
</div>


